package com.ruoyi;

import dev.langchain4j.model.chat.ChatLanguageModel;
import dev.langchain4j.model.openai.OpenAiChatModel;

public class gpt_4o_mini_Main {
    public static void main(String[] args) {
        ChatLanguageModel model = OpenAiChatModel.builder()
                .apiKey("demo")
                .modelName("gpt-4o-mini")
                .temperature(0.7)
                .build();
        String generate = model.generate("可以帮我写一篇50字的童话故事吗");
        System.out.println(generate);
    }
}
